package com.qd.common.panda.domain.entity.carpark;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 设置门岗
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class CarParkDoorpostDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "门岗ID不能为空", groups = {UpdateGroup.class})
    @Size(max = 50, message = "门岗ID长度不能超过{max}位", groups = {UpdateGroup.class})
    private String did;
    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = DefaultGroup.class)
    @Size(max = 100, message = "名称长度不能超过{max}位", groups = DefaultGroup.class)
    private String name;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    /**
     * 停车场
     */
    @NotBlank(message = "停车场不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "停车场长度不能超过{max}位", groups = DefaultGroup.class)
    private String parkId;
    /**
     * 进出标志
     */
    @NotBlank(message = "进出标志不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "进出标志长度不能超过{max}位", groups = DefaultGroup.class)
    private String accessSign;
    /**
     * 进出标志显示
     */
    private String accessSignDisplay;

    @Override
    public void freeData() {
        this.did = null;
        this.name = null;
        this.addTime = null;
        this.updateTime = null;
        this.parkId = null;
        this.accessSign = null;
        this.accessSignDisplay = null;
        super.freeData();
    }
}
